home *** CD-ROM | disk | FTP | other *** search
- /* $VER: DMFilter.rexx 1.2 (25.7.98) by J. Tierney, Nils Goers
-
- DiskMaster II Filter v1.2
- 7/25/98 J. Tierney, Nils Goers
-
- Purpose: Filters the source directory listing to display only certain files.
-
- Usage: DMFilter.rexx [pattern]
-
- pattern - Only files matching this pattern will be displayed.
- If no pattern is given, a requester will pop up asking for
- one.
-
- Note: To get a complete listing again, either "NewDir %p", call
- DMFilter.rexx again with a pattern of "*", or activate the window's
- string gadget and press <RETURN>.
-
-
- Examples:
- AddCmd Filter, 10, Rexx DMFilter.rexx
-
- AddCmd Only Icons, 10, REXX DMFilter.rexx *.info
-
-
- History:
- - 1.2 (07/25/98)
- - Small improvements to the way the last-used pattern is saved (uses
- the clip list), & automatically gets the DM port name.
-
- - 1.1 (07/24/98) - By Nils Goers
- - The last-used pattern is saved, & used the next time the script is run.
- - Bug fix: Canceling the requester no longer causes the source window
- to revert to the volume/device list.
-
- - 1.0 (02/02/98)
- */
-
- OPTIONS RESULTS
-
- PARSE ARG pat
-
- filterclip = 'DMFilterPat.' || ADDRESS()
-
- STATUS P
- dir = result
- IF RIGHT(dir, 1) ~= ':' THEN dir = dir || '/'
-
- IF pat = '' THEN DO
- pat = GETCLIP(filterclip)
- IF pat = '' THEN pat = '*'
-
- 'CONFIRM "Enter filter pattern:" Okay Cancel' pat
- IF rc = 1 THEN EXIT 0
- pat = result
-
- CALL SETCLIP(filterclip, pat)
- END
-
- dir = dir || pat
- 'NEWDIR' dir
-